﻿#region << 文件说明 >>
/*----------------------------------------------------------------
 * 命名空间：Vampirewal.ToolCenter.HttpTestHelper
 * 唯一标识：9bb29f0a-965e-4d9c-be9e-a615e2a3b03d
 * 文件名：Startup
 * 
 * 创建者：杨程
 * 电子邮箱：235160615@qq.com
 * 创建时间：2023/12/27 16:19:20
 * 版本：V1.0.0
 * 描述：
 *
 * ----------------------------------------------------------------
 * 修改人：
 * 时间：
 * 修改说明：
 *
 * 版本：V1.0.1
 *----------------------------------------------------------------*/
#endregion << 文件说明 >>

using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Vampirewal.Core;
using Vampirewal.Core.HttpClientService;
using Vampirewal.Core.Interface;
using Vampirewal.Core.SimpleMVVM;
using Vampirewal.ToolCenter.Plugin;

namespace Vampirewal.ToolCenter.HttpTestHelper;

/// <summary>
/// 
/// </summary>
public partial class Startup:IStartupBase
{
    /// <summary>   
    /// 构造函数
    /// </summary>
    public Startup()
    {

    }

    public void OnAppRun(bool IsRun)
    {
        var dialog = VampirewalCoreContext.GetInstance().GetService<IVampirewalCoreDialogMessage>();
        dialog.ShowPopupWindow(new Core.WindoSetting.PopupWindowSetting()
        {
            Message = "Http测试工具启动了",
            OwnerWindow = WindowsManager.GetInstance().MainWindow,
            Type = Core.WindoSetting.MessageType.Successful
        });
    }

    public void RegisterConfig(List<IOptions> options)
    {

    }

    public void RegisterService(IServiceCollection services)
    {
        services.AddSingleton<IHttpClientService, VampirewalHttpClientService>();
    }


}

public class PluginInfo : IPlugin
{
    public string PluginName => "Http请求测试插件";
    public string PluginVersion => "1.0.0.1";
    public string PluginDescription => "简单测试一下WebApi";
    public string PluginIconName => "Vampirewal-Logo.png";

    public string ViewKey => "Vampirewal.ToolCenter.HttpTestHelper.HttpTestView";

    public double Width => 500;

    public double Height => 500;

    public string PluginFolderName => "Vampirewal.ToolCenter.HttpTestHelper";
}